<!DOCTYPE html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
    <link rel="stylesheet" href="<%= themeConfig.domain %>/media/css/bootstrap.min.css%>">
    <link rel="stylesheet" href="<%= themeConfig.domain %>/media/css/live2d.css%>">
    <link rel="stylesheet" href="<%= themeConfig.domain %>/styles/main.css">
    <link rel="stylesheet" href="<%= themeConfig.domain %>/media/css/font-awesome.css%>">
    <meta name="description" content="<%- site.customConfig.metaDescription || themeConfig.siteDescription %>" />
    <title><%- themeConfig.siteName %></title>
</head>


<body>
    <div id="content">
        <div class="nav-large">
            <div class="row">
                <div class="side"><%- include('./includes/side') %></div>
                <!-- ----------------左侧菜单栏html 👇-------------------------------------->
                <%if(site.customConfig.menuposition=='left'){%>
                <div id="tab1" class="tab">
                    <div class="bars">
                        <span></span>
                        <span></span>
                        <span></span>
                    </div>
                    <div class="close"></div>
                </div>
                <div class="col-md-1 col-lg-3"></div>
                <div class="mobilebar"><%- include('./includes/bar') %>
                </div>
                <div id="main" class="col-xs-12 col-sm-12 col-md-12 col-lg-7">
                    <div class="mobilebar">
                        <%- include('./includes/mobilebg') %>
                    </div>
                    <%- include('./includes/archives-detail') %>
                    <div>
                        <%- include('./includes/pagination') %>
                        <div style="padding-bottom:10%"></div>
                    </div>
                </div>
                <div class="col-md-1 col-lg-2"></div>
                <!-- ----------------左侧菜单栏html 👆-------------------------------------->
                <!------------------ 顶部菜单栏html👇--------->
                <%}else{%>
                <div class="mobilebar"><%- include('./includes/bar') %>
                </div>
                <div id="main" class="col-xs-12 col-sm-12 col-md-12 col-lg-6 topindex">
                    <div class="mobilebar">
                        <%- include('./includes/mobilebg') %>
                    </div>
                    <%- include('./includes/archives-detail') %>
                    <div>
                        <%- include('./includes/pagination') %>
                        <div style="padding-bottom:10%"></div>
                    </div>
                    <%if(site.customConfig.menuposition=='top'){%>
                        <%- include('./includes/footer') %>
                    <%}%>
                </div>
                <%}%>
                <!------------------ 顶部菜单栏html👆--------->
                <div class="col-xs-6 col-sm-3"></div>
            </div>
            <%if(site.customConfig.aplayerchoice){%>
                <%- include('./includes/aplayer') %>
                <%}%>
        </div>
        <div id="bg">
        </div>
        <!------- 背景图加载方式👇----- -->
        <div id="bgchoice" style="display: none"><%= site.customConfig.bgchoice%>
            </div>
            <%if(site.customConfig.bgchoice=='default'){%>
            <div id="bgurl" style="display:none"><%= site.customConfig['bgimage'] %></div>
            <%} else{%>
            <div id="bgurl" style="display:none"><%= site.customConfig['bgimagelink'] %></div>
            <%}%>   
        <!------- 背景图加载方式👆----- -->
    </div>

        <div id="landlord">
            <div class="message" style="opacity:0"></div>
            <canvas id="live2d" width="240" height="250" class="live2d"></canvas>
        </div>
        <div id="domainname" style="display:none"><%= themeConfig.domain %>
        </div>
</body>

</html>
<!-------------------- live2d功能👇 --------------------------->
<%if (site.customConfig.live2d){ %>
<script type="text/javascript">
    var message_Path = '/live2d/'
    var home_Path = document.getElementById("domainname").innerHTML + "/"; //此处修改为你的域名，必须带斜杠
</script>
<script type="text/javascript" src="<%= themeConfig.domain %>/media/js/live2d.js%>"></script>
<script type="text/javascript" src="<%= themeConfig.domain %>/media/live2d/js/message.js%>"></script>
<script type="text/javascript">
    loadlive2d("live2d", "<%= themeConfig.domain %>/media/live2d/assets/tororo.model.json%>");
</script>
<%}%>
<!-------------------- live2d功能👆 --------------------------->

<!------------ 加载全局背景图功能👇（开始时没有写好，这功能有点鸡肋/(ㄒoㄒ)/~~） -->
<script>
    var bgchoice = "<%=site.customConfig.bgchoice%>"
    var bg = $('#bg');
    var bgurl = document.getElementById("bgurl").innerHTML;
    if (bgchoice == 'default')
    {
        for (var i = 0; i < 3; i++)
            bgurl = bgurl.replace("\\", "/");
        bgurl = "<%= themeConfig.domain %>/" + bgurl;
    }
    bg.css("background", "url('" + bgurl + "')");

    window.onload = function () {
        aplayerbtnInit();
    }
</script>
<!------------ 加载全局背景图功能👆（开始时没有写好，这功能有点鸡肋/(ㄒoㄒ)/~~） -->
<%if (site.customConfig.menuposition=='left'){ %>
<script src="<%= themeConfig.domain %>/media/js/index.js%>"></script>
<%}%>